<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="zh">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.11.0"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>cppMISC: wheels::CTimer类 参考</title>
<link href="../../tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../jquery.js"></script>
<script type="text/javascript" src="../../dynsections.js"></script>
<script type="text/javascript" src="../../clipboard.js"></script>
<link href="../../navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../resize.js"></script>
<script type="text/javascript" src="../../cookie.js"></script>
<link href="../../search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="../../search/searchdata.js"></script>
<script type="text/javascript" src="../../search/search.js"></script>
<script type="text/javascript" src="../../darkmode_toggle.js"></script>
<link href="../../doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr id="projectrow">
  <td id="projectalign">
   <div id="projectname">cppMISC<span id="projectnumber">&#160;v1.1</span>
   </div>
   <div id="projectbrief">cppMisc 文档系统</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.11.0 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "../../search/",'.html');
/* @license-end */
</script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() { codefold.init(1); });
/* @license-end */
</script>
<script type="text/javascript" src="../../menudata.js"></script>
<script type="text/javascript" src="../../menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('../../',true,false,'search.php','搜索',false);
  $(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function(){ initResizable(false); });
/* @license-end */
</script>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<div id="MSearchResults">
<div class="SRPage">
<div id="SRIndex">
<div id="SRResults"></div>
<div class="SRStatus" id="Loading">载入中...</div>
<div class="SRStatus" id="Searching">搜索中...</div>
<div class="SRStatus" id="NoMatches">未找到</div>
</div>
</div>
</div>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="../../df/d8d/namespacewheels.html">wheels</a></li><li class="navelem"><a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html">CTimer</a></li>  </ul>
</div>
</div><!-- top -->
<div id="doc-content">
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public 成员函数</a> &#124;
<a href="../../dc/d4a/classwheels_1_1_c_timer-members.html">所有成员列表</a>  </div>
  <div class="headertitle"><div class="title">wheels::CTimer类 参考</div></div>
</div><!--header-->
<div class="contents">

<p><code>#include &lt;<a class="el" href="../../df/d05/timer_8hpp_source.html">timer.hpp</a>&gt;</code></p>
<div class="dynheader">
类 wheels::CTimer 继承关系图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/dfc/classwheels_1_1_c_timer__inherit__graph.png" border="0" usemap="#awheels_1_1_c_timer_inherit__map" alt="Inheritance graph"/></div>
<map name="awheels_1_1_c_timer_inherit__map" id="awheels_1_1_c_timer_inherit__map">
<area shape="rect" title=" " alt="" coords="13,347,189,789"/>
<area shape="rect" href="../../d2/d38/structi_timer.html" title="定时器定义接口" alt="" coords="5,5,196,299"/>
<area shape="poly" title=" " alt="" coords="103,314,103,347,98,347,98,314"/>
</map>
</div>
<div class="dynheader">
wheels::CTimer 的协作图:</div>
<div class="dyncontent">
<div class="center"><img src="../../db/d21/classwheels_1_1_c_timer__coll__graph.png" border="0" usemap="#awheels_1_1_c_timer_coll__map" alt="Collaboration graph"/></div>
<map name="awheels_1_1_c_timer_coll__map" id="awheels_1_1_c_timer_coll__map">
<area shape="rect" title=" " alt="" coords="13,347,189,789"/>
<area shape="rect" href="../../d2/d38/structi_timer.html" title="定时器定义接口" alt="" coords="5,5,196,299"/>
<area shape="poly" title=" " alt="" coords="103,314,103,347,98,347,98,314"/>
</map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="pub-methods" name="pub-methods"></a>
Public 成员函数</h2></td></tr>
<tr class="memitem:a93e4d770fd09f5e1b984768620cc52bf" id="r_a93e4d770fd09f5e1b984768620cc52bf"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a93e4d770fd09f5e1b984768620cc52bf">CTimer</a> ()</td></tr>
<tr class="separator:a93e4d770fd09f5e1b984768620cc52bf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a689ba0400ed26875987d51b5698e638f" id="r_a689ba0400ed26875987d51b5698e638f"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a689ba0400ed26875987d51b5698e638f">CTimer</a> (long ms, bool oneShot=false)</td></tr>
<tr class="separator:a689ba0400ed26875987d51b5698e638f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab3abc5be88e46d44929b65cc3f03cead" id="r_ab3abc5be88e46d44929b65cc3f03cead"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ab3abc5be88e46d44929b65cc3f03cead">CTimer</a> (std::function&lt; void() &gt; fun, long ms, bool oneShot=false)</td></tr>
<tr class="separator:ab3abc5be88e46d44929b65cc3f03cead"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac4981c5eaeeacca8b3a123d4069c8812" id="r_ac4981c5eaeeacca8b3a123d4069c8812"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ac4981c5eaeeacca8b3a123d4069c8812">CTimer</a> (const <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html">CTimer</a> &amp;b)</td></tr>
<tr class="separator:ac4981c5eaeeacca8b3a123d4069c8812"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:afd3f6595928cd20f7faaece75f017733" id="r_afd3f6595928cd20f7faaece75f017733"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#afd3f6595928cd20f7faaece75f017733">~CTimer</a> ()</td></tr>
<tr class="separator:afd3f6595928cd20f7faaece75f017733"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5a4c68739dffae58b731c5e9fcb98b0b" id="r_a5a4c68739dffae58b731c5e9fcb98b0b"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a5a4c68739dffae58b731c5e9fcb98b0b">Start</a> (long ms=-1, bool oneShot=false) final</td></tr>
<tr class="memdesc:a5a4c68739dffae58b731c5e9fcb98b0b"><td class="mdescLeft">&#160;</td><td class="mdescRight">启动或者重启计时器。  <br /></td></tr>
<tr class="separator:a5a4c68739dffae58b731c5e9fcb98b0b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a503a7fd2e5fdfcd321622f6c34f234e3" id="r_a503a7fd2e5fdfcd321622f6c34f234e3"><td class="memItemLeft" align="right" valign="top">virtual void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a503a7fd2e5fdfcd321622f6c34f234e3">SetOwner</a> (std::function&lt; void()&gt; fun) final</td></tr>
<tr class="memdesc:a503a7fd2e5fdfcd321622f6c34f234e3"><td class="mdescLeft">&#160;</td><td class="mdescRight">指定事件响应函数，  <br /></td></tr>
<tr class="separator:a503a7fd2e5fdfcd321622f6c34f234e3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a128e8bdb25823a748453e1b2a817ec99" id="r_a128e8bdb25823a748453e1b2a817ec99"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a128e8bdb25823a748453e1b2a817ec99">Stop</a> () final</td></tr>
<tr class="memdesc:a128e8bdb25823a748453e1b2a817ec99"><td class="mdescLeft">&#160;</td><td class="mdescRight">停止计时器  <br /></td></tr>
<tr class="separator:a128e8bdb25823a748453e1b2a817ec99"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad766f6d3012844697d709021ab23bb1b" id="r_ad766f6d3012844697d709021ab23bb1b"><td class="memItemLeft" align="right" valign="top">virtual bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#ad766f6d3012844697d709021ab23bb1b">IsRuning</a> () final</td></tr>
<tr class="memdesc:ad766f6d3012844697d709021ab23bb1b"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断计时器是否正在运行  <br /></td></tr>
<tr class="separator:ad766f6d3012844697d709021ab23bb1b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a981c7a2959ddebff80bd6f8eb2312a4f" id="r_a981c7a2959ddebff80bd6f8eb2312a4f"><td class="memItemLeft" align="right" valign="top">virtual <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a981c7a2959ddebff80bd6f8eb2312a4f">Reset</a> () final</td></tr>
<tr class="memdesc:a981c7a2959ddebff80bd6f8eb2312a4f"><td class="mdescLeft">&#160;</td><td class="mdescRight">复位计时，让计时器从零开始计时  <br /></td></tr>
<tr class="separator:a981c7a2959ddebff80bd6f8eb2312a4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0e94a7484f06a6e38c29591182191510" id="r_a0e94a7484f06a6e38c29591182191510"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="#a0e94a7484f06a6e38c29591182191510">setTick</a> (long tick)</td></tr>
<tr class="separator:a0e94a7484f06a6e38c29591182191510"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a id="inherited" name="inherited"></a>
额外继承的成员函数</h2></td></tr>
<tr class="inherit_header pub_types_structi_timer"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_types_structi_timer')"><img src="../../closed.png" alt="-"/>&#160;Public 类型 继承自 <a class="el" href="../../d2/d38/structi_timer.html">iTimer</a></td></tr>
<tr class="memitem:a31bdd3250ca6c5542d0ec156bd82c5ab inherit pub_types_structi_timer" id="r_a31bdd3250ca6c5542d0ec156bd82c5ab"><td class="memItemLeft" align="right" valign="top">enum &#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> { <br />
&#160;&#160;<a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5abaa09563b77a12d14f77018d048ce4d6fb">ERR_CREATE_TIMER</a> = -1000
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba411cbed936ceec95393a481fd39d6cef">ERR_MISSING_INFO_FUN</a>
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba69bdc858844fbe024b1459b4d869e2a7">ERR_START_TIMER</a>
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba9d8d590f2b964254d8190d547b882fde">ERR_STOP_TIMER</a>
, <br />
&#160;&#160;<a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba4033ecbc2c2e7418fd4f2d5e62159d6c">ERR_TICK</a>
, <a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5aba74f5e1cb5939af592e4e7c06a3406e9e">OK</a> = 0
<br />
 }</td></tr>
<tr class="separator:a31bdd3250ca6c5542d0ec156bd82c5ab inherit pub_types_structi_timer"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="inherit_header pub_static_methods_structi_timer"><td colspan="2" onclick="javascript:dynsection.toggleInherit('pub_static_methods_structi_timer')"><img src="../../closed.png" alt="-"/>&#160;静态 Public 成员函数 继承自 <a class="el" href="../../d2/d38/structi_timer.html">iTimer</a></td></tr>
<tr class="memitem:ae0b9a3f6caa6ae2a56bd06898da25ce1 inherit pub_static_methods_structi_timer" id="r_ae0b9a3f6caa6ae2a56bd06898da25ce1"><td class="memItemLeft" align="right" valign="top">static std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="../../d2/d38/structi_timer.html#ae0b9a3f6caa6ae2a56bd06898da25ce1">errMsg</a> (<a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">emErrCode</a> e)</td></tr>
<tr class="separator:ae0b9a3f6caa6ae2a56bd06898da25ce1 inherit pub_static_methods_structi_timer"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">详细描述</h2>
<div class="textblock">
<p class="definition">在文件 <a class="el" href="../../df/d05/timer_8hpp_source.html">timer.hpp</a> 第 <a class="el" href="../../df/d05/timer_8hpp_source.html#l00026">26</a> 行定义.</p>
</div><h2 class="groupheader">构造及析构函数说明</h2>
<a id="a93e4d770fd09f5e1b984768620cc52bf" name="a93e4d770fd09f5e1b984768620cc52bf"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a93e4d770fd09f5e1b984768620cc52bf">&#9670;&#160;</a></span>CTimer() <span class="overload">[1/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::CTimer </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00019">19</a> 行定义.</p>

</div>
</div>
<a id="a689ba0400ed26875987d51b5698e638f" name="a689ba0400ed26875987d51b5698e638f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a689ba0400ed26875987d51b5698e638f">&#9670;&#160;</a></span>CTimer() <span class="overload">[2/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::CTimer </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>oneShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00029">29</a> 行定义.</p>

</div>
</div>
<a id="ab3abc5be88e46d44929b65cc3f03cead" name="ab3abc5be88e46d44929b65cc3f03cead"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ab3abc5be88e46d44929b65cc3f03cead">&#9670;&#160;</a></span>CTimer() <span class="overload">[3/4]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::CTimer </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void() &gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>oneShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00038">38</a> 行定义.</p>

</div>
</div>
<a id="ac4981c5eaeeacca8b3a123d4069c8812" name="ac4981c5eaeeacca8b3a123d4069c8812"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ac4981c5eaeeacca8b3a123d4069c8812">&#9670;&#160;</a></span>CTimer() <span class="overload">[4/4]</span></h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">wheels::CTimer::CTimer </td>
          <td>(</td>
          <td class="paramtype">const <a class="el" href="../../db/d3e/classwheels_1_1_c_timer.html">CTimer</a> &amp;</td>          <td class="paramname"><span class="paramname"><em>b</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../df/d05/timer_8hpp_source.html">timer.hpp</a> 第 <a class="el" href="../../df/d05/timer_8hpp_source.html#l00038">38</a> 行定义.</p>

</div>
</div>
<a id="afd3f6595928cd20f7faaece75f017733" name="afd3f6595928cd20f7faaece75f017733"></a>
<h2 class="memtitle"><span class="permalink"><a href="#afd3f6595928cd20f7faaece75f017733">&#9670;&#160;</a></span>~CTimer()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">CTimer::~CTimer </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00047">47</a> 行定义.</p>

</div>
</div>
<h2 class="groupheader">成员函数说明</h2>
<a id="ad766f6d3012844697d709021ab23bb1b" name="ad766f6d3012844697d709021ab23bb1b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad766f6d3012844697d709021ab23bb1b">&#9670;&#160;</a></span>IsRuning()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">bool CTimer::IsRuning </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>判断计时器是否正在运行 </p>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#abea86b75a4bcc2399821b799e221b9ce">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00066">66</a> 行定义.</p>

</div>
</div>
<a id="a981c7a2959ddebff80bd6f8eb2312a4f" name="a981c7a2959ddebff80bd6f8eb2312a4f"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a981c7a2959ddebff80bd6f8eb2312a4f">&#9670;&#160;</a></span>Reset()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a> CTimer::Reset </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>复位计时，让计时器从零开始计时 </p>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#ad51fd07ebb8585928243674cb21e80e0">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00072">72</a> 行定义.</p>

</div>
</div>
<a id="a503a7fd2e5fdfcd321622f6c34f234e3" name="a503a7fd2e5fdfcd321622f6c34f234e3"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a503a7fd2e5fdfcd321622f6c34f234e3">&#9670;&#160;</a></span>SetOwner()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void CTimer::SetOwner </td>
          <td>(</td>
          <td class="paramtype">std::function&lt; void()&gt;</td>          <td class="paramname"><span class="paramname"><em>fun</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>指定事件响应函数， </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">fun</td><td>，事件响应的函数对象，使用std::bind完成或者直接指定函数对象 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#aa51cbfaef39ee9841c24ff65ce720acc">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00055">55</a> 行定义.</p>

</div>
</div>
<a id="a0e94a7484f06a6e38c29591182191510" name="a0e94a7484f06a6e38c29591182191510"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0e94a7484f06a6e38c29591182191510">&#9670;&#160;</a></span>setTick()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">void wheels::CTimer::setTick </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>tick</em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#a3aaa71906aca3939acf219852b2d36d9">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../df/d05/timer_8hpp_source.html">timer.hpp</a> 第 <a class="el" href="../../df/d05/timer_8hpp_source.html#l00064">64</a> 行定义.</p>

</div>
</div>
<a id="a5a4c68739dffae58b731c5e9fcb98b0b" name="a5a4c68739dffae58b731c5e9fcb98b0b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5a4c68739dffae58b731c5e9fcb98b0b">&#9670;&#160;</a></span>Start()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a> CTimer::Start </td>
          <td>(</td>
          <td class="paramtype">long</td>          <td class="paramname"><span class="paramname"><em>ms</em></span><span class="paramdefsep"> = </span><span class="paramdefval">-1</span>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool</td>          <td class="paramname"><span class="paramname"><em>oneShot</em></span><span class="paramdefsep"> = </span><span class="paramdefval">false</span>&#160;)</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>启动或者重启计时器。 </p>
<dl class="params"><dt>参数</dt><dd>
  <table class="params">
    <tr><td class="paramname">ms</td><td>， 计时时长，单位ms，当ms小于0的时候，使用就计时时长启动计时器 </td></tr>
    <tr><td class="paramname">oneShot</td><td>， 是否单次计时，true单次计时，否则连续计时 </td></tr>
  </table>
  </dd>
</dl>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#a0bd87be9906e599b0776fc592cf81f9c">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00050">50</a> 行定义.</p>

</div>
</div>
<a id="a128e8bdb25823a748453e1b2a817ec99" name="a128e8bdb25823a748453e1b2a817ec99"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a128e8bdb25823a748453e1b2a817ec99">&#9670;&#160;</a></span>Stop()</h2>

<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="../../d2/d38/structi_timer.html#a31bdd3250ca6c5542d0ec156bd82c5ab">iTimer::emErrCode</a> CTimer::Stop </td>
          <td>(</td>
          <td class="paramname"><span class="paramname"><em></em></span></td><td>)</td>
          <td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">final</span><span class="mlabel">virtual</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>停止计时器 </p>

<p>实现了 <a class="el" href="../../d2/d38/structi_timer.html#a38cfdd65a88c39d24e2ddc3ceeebda2e">iTimer</a>.</p>

<p class="definition">在文件 <a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a> 第 <a class="el" href="../../dc/de5/timer_8cpp_source.html#l00061">61</a> 行定义.</p>

</div>
</div>
<hr/>该类的文档由以下文件生成:<ul>
<li>include/<a class="el" href="../../df/d05/timer_8hpp_source.html">timer.hpp</a></li>
<li>src/<a class="el" href="../../dc/de5/timer_8cpp_source.html">timer.cpp</a></li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="../../doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.11.0
</small></address>
</div><!-- doc-content -->
</body>
</html>
